Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(EmptyState): extract helpers, fix(EmptyState): getElementChildText fix #602

Merged

Conversation

adamviktora
Copy link
Contributor

@adamviktora adamviktora commented Mar 5, 2024

Closes #594

Also applies a fix to a function which gets children text of EmptyStateHeader.

Previously, situations like this:

<EmptyStateHeader>
  <h1>Title</h1>
</EmptyStateHeader>

were caught in switch command under JSXText (because of the initial whitespaces before <h1>).
And if not, it ended up always being wrapped in "", which we don't want, if the children is not a single JSXText element.

@adamviktora adamviktora changed the title Empty state: extract helpers & getChildrenText fix refactor(EmptyState): extract helpers, fix(EmptyState): getChildrenText fix Mar 12, 2024
@adamviktora adamviktora changed the title refactor(EmptyState): extract helpers, fix(EmptyState): getChildrenText fix refactor(EmptyState): extract helpers, fix(EmptyState): getElementChildText fix Mar 12, 2024
Copy link
Collaborator

@wise-king-sullyman wise-king-sullyman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great 🔥

One question/suggestion then it should be good to go.

Copy link
Collaborator

@wise-king-sullyman wise-king-sullyman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Copy link
Contributor

@Dominik-Petrik Dominik-Petrik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the nit LGTM! 🚀

Co-authored-by: Dominik Petřík <[email protected]>
@Dominik-Petrik Dominik-Petrik merged commit 0cbb6b1 into patternfly:main Mar 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Helpers - Extract & refine small helpers from #582
3 participants